// run: $exec < input
#include <iostream>

int const maxn = 100007;
int a[maxn];
int b[maxn];
int n, k;

int main()
{
	std::cin >> n >> k;
	for (int i = 0; i < n; i++) std::cin >> a[i];
	b[0] = 1;
	int dir = 1, t = k;
	for (int i = 1; i < n; i++) {
		if (t) {
			b[i] = b[i - 1] + dir * t;
			t--; dir = -dir;
		} else {
			b[i] = i + 1;
		}
	}
	for (int i = 0; i < n; i++)
		std::cout << b[i] << " ";
}

